import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Config')
export default class Config {
    

    // 展示二维数组
    static showMap(arr: number[][]) {
        for (var ix = 0; ix < arr.length; ix++) {
            var str = iz + " => "
            for (var iz = 0; iz < arr[ix].length; iz++) {
                str = str + arr[ix][iz] + ", "
            }
            
            console.log ( str )
        }
    }

    // 将若干个数据从数组中移除
    static removeFromArray( arr, cleans ) {
        cleans.forEach(target => {
            const cIndex = arr.indexOf(target);
            if (cIndex !== -1) {
                arr.splice(cIndex, 1)
            }
        });
    }
}


